import request from "@/utils/request";

export default {
  getActivityTypes() {
    return request({
      url: "/events/eventTypes",
      method: "get",
    });
  },
  getEvents(data) {
    return request({
      url: "/events/mobile",
      method: "get",
      params: {
        typeId: data,
      },
    });
  },
  getPastEvents() {
    return request({
      url: "events/past",
      method: "get",
    });
  },
  getEventDetail(eventId) {
    return request({
      url: `events/user/detail/${eventId}`,
      method: "get",
    });
  },
  getEventStatus(eventId) {
    return request({
      url: `events/user/state/${eventId}`,
      method: "get",
    });
  },
  createEventOrganizer(data) {
    return request({
      url: "events/organizers",
      method: "post",
      data,
    });
  },
  getEventsOrganizer(query) {
    return request({
      url: "events/organizer",
      method: "get",
      params: {
        query: query,
      },
    });
  },
  getEventStatusOrganizer(eventId) {
    return request({
      url: `events/organizer/state/${eventId}`,
      method: "get",
    });
  },
  getEventById(eventId) {
    return request({
      url: `events/${eventId}`,
      method: "get",
    });
  },
  updateEvent(form) {
    return request({
      url: "events/organizer",
      method: "put",
      data:form,
    });
  },
};
